import os, sys
module_path = os.path.abspath(os.path.join('..'))
sys.path.append(module_path)
from miner.cluster.clustering import Cluster
import jieba


input=["客户不接受ETC违约金","客户对于优惠买单无法使用不满 ","客户对于可用额度不满","客户不满分期手续费","客户对账单产生费用不满"]
sentences=[" ".join(jieba.lcut(x)) for x in input]
print(sentences)
clustering = Cluster(sentences)
results = clustering(method='hdbscan', min_cluster_size=2,prediction_data=False)
print(results)
print(clustering.top_terms(topx=6))
print(clustering.item_counts())